<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加课程</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script type="text/javascript" src="/layui/layui.js"></script>
    <script type="text/javascript" src="/jquery/jquery-3.2.1.min.js"></script>
    <link rel="stylesheet" href="/ztree/css/metroStyle.css">
    <script type="text/javascript" src="/ztree/js/jquery.ztree.all.min.js"></script>
    <link rel="stylesheet" href="/css/course/course-add.css">
</head>
<body>
<div id="box">
    <div class="layui-elem-quote">
        <h2 class="layui-left"></h2>
        <div class="layui-right">
            <button class="layui-btn layui-btn-sm" id="refresh">
                <i class="layui-icon layui-icon-refresh"></i>刷新
            </button>
            <button class="layui-btn layui-btn-sm" id="goBack">
                <i class="layui-icon layui-icon-return"></i>返回
            </button>
        </div>
    </div>
    <form class="layui-form" id="form" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label">课程分类：</label>
            <div class="layui-input-block">
                <input type="text" name="title" required lay-verify="required" class="layui-input" required placeholder="请选择课程分类" disabled/>
                <a href="javascript:popup();" id="popup"><img src="/images/icon1.gif"></a>
                <input type="hidden" name="title"/>
                <input type="hidden" name="classId"/>
            </div>
        </div>
        <div id="courseSort" class="layui-form-item layui-none">
            <div class="layui-input-block">
                <p id="courseType">你当前选择的课程类型是：<span id="type"></span></p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">课程名称：</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" required lay-verify="required" placeholder="请输入课程名称" name="courseName"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">课程价格：</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" name="courseNprice" required lay-verify="required|price"
                       placeholder="请输入课程价格"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">课程关键字：</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" name="coursePrimary" required lay-verify="required" placeholder="请输入课程关键字"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">课程简介：</label>
            <div class="layui-input-block">
                <textarea class="layui-textarea" name="courseIntro" required lay-verify="required" placeholder="请输入课程简介"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">课程详细：</label>
            <div class="layui-input-block">
                <textarea class="layui-textarea" name="courseInfo" required lay-verify="required" placeholder="请输入课程详细"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">课程预览图：</label>
            <div class="layui-input-block">
                <ul id="imgs">
                    <li class="layui-left layui-li" id="test">
                        <img src="/images/add.png">
                    </li>
                </ul>
                <input type="hidden" name="url" required lay-verify="required"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">课程视频：</label>
            <div class="layui-input-block">
                <button type="button" id="video" class="layui-btn"><i class="layui-icon layui-icon-upload"></i>上传视频
                </button>
            </div>
        </div>
        <div id="videoPreview" class="layui-form-item layui-none">
            <label class="layui-form-label">视频预览：</label>
            <div class="layui-input-block">
                <video controls="controls" id="courseUrl"></video>
                <div class="layui-progress layui-progress-big" lay-showpercent="yes" lay-filter="demo">
                    <div class="layui-progress-bar" lay-percent=""></div>
                </div>
                <input type="hidden" name="courseUrl" required lay-verify="required"/>
                <!--课程时长单位分钟-->
                <input type="hidden" name="courseTime">
            </div>
        </div>
        <div class="layui-form-item">
            <button class="layui-btn" id="submit" type="submit" lay-submit lay-filter="sub">提交</button>
        </div>
        <!--用户id-->
        <input type="hidden" name="userId">
        <!--创建人id-->
        <input type="hidden" name="createId">
        <!--2新品-->
        <input type="hidden" name="recommend" value="2">
        <!--上架状态3未上架-->
        <input type="hidden" name="courseStatus" value="3">
        <!--审核状态3未审核-->
        <input type="hidden" name="courseCstatus" value="3">
        <!--课程序号-->
        <input type="hidden" name="courseNo" value="1">
        <!--点赞数量-->
        <input type="hidden" name="likeNum" value="0">
        <!--分享数量-->
        <input type="hidden" name="shareNum" value="0">
        <!--收藏数量-->
        <input type="hidden" name="collectNum" value="0">
        <!--预览数量-->
        <input type="hidden" name="lookNum" value="0">
        <!--销售数量-->
        <input type="hidden" name="saleNum" value="0">
    </form>
</div>
</body>
<script type="text/javascript" src="/js/course/course-add.js"></script>
</html>